package com.yyw.listener;

import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import org.springframework.beans.factory.annotation.Autowired;

import com.yyw.dao.UserDao;

@WebListener
public class SessionListener implements HttpSessionListener {

    @Autowired
    private UserDao userDao;

    @Override
    public void sessionCreated(HttpSessionEvent se) {
//        User user = userDao.getUserByTel("15152015941");
//        se.getSession().setAttribute("user", user);

    }

    @Override
    public void sessionDestroyed(HttpSessionEvent se) {
        // TODO Auto-generated method stub

    }

}
